﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<RuiJing.Web.Models.ProductsModels.DetailModel>" %>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
<div class="detail">
    <div class="content_title">
        当前位置:<%=Model.TypeName_Ch %>
    </div>
    <%=Html.ActionLink(">>返回", "index", new { A = Request["_A"] , B = ViewData["Route_B"], C = ViewData["Route_C"], D = ViewData["Route_D"], L=ViewData["Route_L"] })%>
    <div>
        <% var f = Model.Item.DefaultPic ?? (Model.Pictures.First().FileName); %>
        <div class="leftpic">
            <div class="imgcon">
            <a href='<%=f %>' target="_blank">
                <img height="150px" src='<%=f %>' alt='' />
            </a>
        </div></div>
        <div class="infos">
            <table width="100%">
                <tr><th colspan="2">产品信息</th></tr>
                <tr>
                    <td align="left" width="100px">编号</td>
                    <td align="left"><%=Model.Item.Number %></td>
                </tr>
                <% foreach(var item in Model.Disc_Ch) %>
                <% { %>
                <tr>
                    <td align="left" width="100px"><%=item.Key %></td>
                    <td align="left"><%=item.Value %></td>
                </tr>
                <% } %>
                <tr>
                    <td align="left" width="100px">点击量</td>
                    <td align="left"><%=Model.Item.ClickCount %></td>
                </tr>
            </table>
        </div>
        <div class="clear"></div>
        <div>
        <div class="pics">
            <% var pics = Model.Pictures.GroupBy(p => p.TypeID).OrderBy(p=>p.Key); %>
            <% foreach(var pic in pics) %>
            <% { %>
                <div class="content_title">
                    <%=Model.PictureTypes.First(p=>p.ID==pic.Key).Name_Ch %>
                </div>
                <br />
                <div class="imgcon">
                <% foreach (var item in pic) %>
                <% { %>
                <a href='<%=item.FileName %>' target="_blank">
                    <img src='<%=item.FileName %>' alt='' />
                </a>
                <div class="clear"></div>
                <% } %>
                </div>
            <% } %>
        </div>
        </div>
    </div>
</div>
</asp:Content>

<asp:Content ID="Content3" ContentPlaceHolderID="StypeAndScript" runat="server">
    <style type="text/css">
        .detail{ height:auto; overflow:hidden; }
        .leftpic{ width:300px; float:left; height:auto; overflow:hidden;}
        .imgcon
        {
            width:100%;
            text-align:center;
            margin-left:auto;
            margin-right:auto;
        }
        .leftpic img
        {
            max-height:378px;
            max-width:300px;
        }
        .pics img
        {
            max-height:500px;
            max-width:500px;
            border:1px solid #888;
        }
        .infos{ width:250px; margin-right:15px; float:right;}
        .infos td { border-bottom:1px dashed #888; }
    </style>
    <script type="text/javascript">
        $(document).ready(function () {
            if (navigator.appVersion && navigator.appVersion.indexOf('MSIE') > 0) {
                $(".pics img").css({ 'height': '500px', 'width': '500px' });
            }
        });
    </script>
</asp:Content>